﻿using Abp.Domain.Entities.Auditing;
using SingleUserMall.Authorization.Users;
using SingleUserMall.Items;
using SingleUserMall.Stores;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SingleUserMall.ShoppingCarts
{
    /// <summary>
    /// 购物车
    /// </summary>
    public class ShoppingCart : FullAuditedEntity<long>
    {
        /// <summary>
        /// 用户id
        /// </summary>
        public long UserId { get; set; }
        [ForeignKey("UserId")]
        public virtual User User { get; set; }
        /// <summary>
        /// 商品规格id
        /// </summary>
        public long ItemSpecId { get; set; }
        [ForeignKey("ItemSpecId")]
        public virtual ItemSpec ItemSpec { get; set; }
        /// <summary>
        /// 商铺ID
        /// </summary>
        public int StoreId { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int Qty { get; set; }

        /// <summary>
        /// 购物车订单（0：商品购物车订单，1：购买树订单）
        /// </summary>
        public ShoppingCartType? ShoppingCartType { get; set; }
    }
}
